{% extends "base.html" %}

{% block title %}用户登录 - 知识图谱系统{% endblock %}

{% block content %}
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-6 col-lg-4">
            <div class="card shadow-sm mt-5">
                <div class="card-body p-4">
                    <div class="text-center mb-4">
                        <i class="fas fa-sign-in-alt fa-3x text-primary mb-3"></i>
                        <h3>用户登录</h3>
                        <p class="text-muted">登录您的知识图谱账户</p>
                    </div>

                    <form method="POST">
                        <div class="mb-3">
                            <label for="username" class="form-label">用户名</label>
                            <div class="input-group">
                                <span class="input-group-text">
                                    <i class="fas fa-user"></i>
                                </span>
                                <input type="text" class="form-control" id="username" name="username" required>
                            </div>
                        </div>

                        <div class="mb-4">
                            <label for="password" class="form-label">密码</label>
                            <div class="input-group">
                                <span class="input-group-text">
                                    <i class="fas fa-lock"></i>
                                </span>
                                <input type="password" class="form-control" id="password" name="password" required>
                            </div>
                        </div>

                        <button type="submit" class="btn btn-primary w-100 mb-3">
                            <i class="fas fa-sign-in-alt me-2"></i>登录
                        </button>
                    </form>

                    <div class="text-center">
                        <p class="mb-0">还没有账户？
                            <a href="{{ url_for('register') }}" class="text-decoration-none">立即注册</a>
                        </p>
                    </div>

                    <hr class="my-4">

                    <div class="alert alert-info">
                        <h6><i class="fas fa-info-circle me-2"></i>演示账户</h6>
                        <p class="mb-1"><strong>管理员:</strong> admin / admin123</p>
                        <p class="mb-0"><strong>普通用户:</strong> 请先注册</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}